package org.rambadger.command.command;

import org.axonframework.commandhandling.annotation.TargetAggregateIdentifier;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotBlank;
import org.rambadger.command.validation.UrlIdentifier;

import javax.validation.constraints.NotNull;

//THIS IS NOT FOR THE UI
//ONLY USE THIS FROM THE COMMAND LINE
public class CreateAdminUser {
    @TargetAggregateIdentifier
    private final String username;
    private final String passwordHash;
    private final String emailAddress;
    private final String firstName;
    private final String lastName;

    public CreateAdminUser(String username, String passwordHash, String emailAddress, String firstName, String lastName) {
        this.username = username;
        this.passwordHash = passwordHash;
        this.emailAddress = emailAddress;
        this.firstName = firstName;
        this.lastName = lastName;
    }


    @UrlIdentifier @NotNull
    public String getUsername() {
        return username;
    }

    public String getPasswordHash() {
        return passwordHash;
    }

    @Email @NotBlank
    public String getEmailAddress() {
        return emailAddress;
    }

    public String getFirstName() {
        return firstName;
    }

    public String getLastName() {
        return lastName;
    }
}
